package com.wanpinghui.wphlibrary.model.product.bean;

import java.util.List;

/***
 * 功能描述:
 * 作者:qiujialiu
 * 时间:2018/1/10
 ***/

public class OrderCreateParams {
    /**
     * 订单创建信息 {
     * buyer_id (integer, optional): 购买人id, 代他采购时必填 ,
     * itemList (Array[下单清单], optional): 订单清单 ,
     * seller_id (integer, optional): 批发商id, 采购他人产品时必填
     * }
     * 下单清单 {
     * cart_item_id (integer, optional): 购物车清单id ,
     * product_desc_id (integer, optional): 产品报价说明id ,
     * product_prices_id (integer, optional): 规格报价id ,
     * quantity (integer, optional): 数量
     * }
     */
    private int buyer_id;
    private List<ItemParams> itemList;
    private Integer seller_id;

    public static class ItemParams{
        private Integer cart_item_id;
        private int product_desc_id;
        private Integer product_prices_id;
        private int quantity;

        public ItemParams(Integer cart_item_id, int product_desc_id, Integer product_prices_id, int quantity) {
            this.cart_item_id = cart_item_id;
            this.product_desc_id = product_desc_id;
            this.product_prices_id = product_prices_id;
            this.quantity = quantity;
        }

        public ItemParams() {
        }

        public int getCart_item_id() {
            return cart_item_id;
        }

        public void setCart_item_id(int cart_item_id) {
            this.cart_item_id = cart_item_id;
        }

        public int getProduct_desc_id() {
            return product_desc_id;
        }

        public void setProduct_desc_id(int product_desc_id) {
            this.product_desc_id = product_desc_id;
        }

        public int getProduct_prices_id() {
            return product_prices_id;
        }

        public void setProduct_prices_id(int product_prices_id) {
            this.product_prices_id = product_prices_id;
        }

        public int getQuantity() {
            return quantity;
        }

        public void setQuantity(int quantity) {
            this.quantity = quantity;
        }
    }

    public OrderCreateParams(int buyer_id, int seller_id) {
        this.buyer_id = buyer_id;
        if (seller_id != 0) {
            this.seller_id = seller_id;
        }
    }

    public OrderCreateParams() {
    }

    public int getBuyer_id() {
        return buyer_id;
    }

    public void setBuyer_id(int buyer_id) {
        this.buyer_id = buyer_id;
    }

    public List<ItemParams> getItemList() {
        return itemList;
    }

    public void setItemList(List<ItemParams> itemList) {
        this.itemList = itemList;
    }

    public int getSeller_id() {
        return seller_id;
    }

    public void setSeller_id(int seller_id) {
        this.seller_id = seller_id;
    }
}
